We used to ignore all target directories, because it was common to
have multiple packages with different target directories in a single
repository. Now, when workspaces are here, such setups usually have a
single target, and we can .gitignore only it. It's useful because
sometimes you want to have a module named `target` in Rust.
If you use non-workspaced multi-package setup, you can create a
.gitignore with `/target/` for each package.
let path = opts.path;
let name = opts.name;
let cfg = global_config(config)?;
- let ignore = ["target/\n", "**/*.rs.bk\n",
+ let ignore = ["/target/\n", "**/*.rs.bk\n",
if !opts.bin { "Cargo.lock\n" } else { "" }]
.concat();